<include file="Public:header"/>
<div class="title"><span>广告管理</span></div>
<link rel="stylesheet" type="text/css" href="__STATIC__/js/fancybox/jquery.fancybox.css" media="screen"/>
<div class="add">
    <a href="{:U('Ad/add/')}">添加广告图片</a>
    <a href="{:U('Ad/noshow/')}">没有显示广告图片</a>
    <a href="{:U('Ad/slide/')}">滚动图显示顺序管理</a>
</div>
{$mall.m_name} - {$floor.f_sain} {$floor.f_name} - {$brand.b_name}
<form method="get">
    根据显示位置查看：
    <select name="market" id="market">
        <foreach name="market" item="m">
            <option value="{$m.id}">{$m.name}</option>
        </foreach>
    </select>
    <select name="floor" id="floor"></select>
    <select name="brand" id="brand"></select>
    <input value="搜索" type="submit">
</form>
<table cellpadding="0" cellspacing="0" border="1">
    <tr>
        <td width="80px">编号</td>
        <td>类型</td>
        <td>名称</td>
        <td>图片</td>
        <td>广告显示位置</td>
        <td>操作</td>
    </tr>
    <foreach name="ad" item="d">
        <tr>
            <td>{$d.id}</td>
            <td>{$d.m_ad_type_name}</td>
            <td>{$d.m_ad_name}</td>
            <td><a class="imageUrl" href="{$d.imageUrl}"><img alt="" src="{$d.imageUrl}" style="max-width: 100px;"></a>
            </td>
            <td>{$d.adAllot.m_name}-{$d.adAllot.f_sain}-{$d.adAllot.f_name}-{$d.adAllot.b_name}</td>
            <td>
                <a href="{:U('Ad/edit/id')}/{$d.id}">编辑</a>
                <a href="{:U('Ad/show/id')}/{$d.id}">显示</a>
                <present name="d.adAllot.m_name">
                    <a href="{:U('Ad/clearShow/id')}/{$d.id}">去除显示</a>
                </present>
            </td>
        </tr>
    </foreach>
</table>
<div>{$page}</div>

<include file="Public:footer"/>
<script type="text/javascript" src="__STATIC__/js/fancybox/jquery.fancybox.pack.js"></script>
<script type="text/javascript">
    $("a.imageUrl").fancybox({
        'width'                : '100%',
        'height'            : '100%',
        'transitionIn'    : 'elastic',
        'transitionOut'    : 'elastic'
    });
    var floorUrl = "{:U('Floor/get/mid')}/";
    var brandUrl = "{:U('Fb/get/fid')}/";
    $('#market').adshow();
</script>